home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / exampleCode / GLX / dualhead / README < prev   
Encoding:
Text File  |  1994-08-02  |  2.1 KB  |  46 lines

  1.  
  2.                 ~4Dgifts/src/exampleCode/GLX/dualhead README
  3.  
  4.  
  5.       The sample code, dualhead.c, illustrates the basics of writing code
  6.       that can take advantage of multiple screens.  If the environment
  7.       variable ALT_DISPLAY is set to a display other than the default
  8.       DISPLAY, dualhead will open windows on that display, provided of 
  9.       course that it has access to do so (see the xhost(1) man page for 
  10.       specifics).
  11.  
  12.       For example purposes, lets say you have access to 2 machines, 
  13.       machine "A" and machine "B".  To run dualhead on machine "A", set 
  14.       the ALT_DISPLAY environment variable to "B:0.0".  At the unix 
  15.       prompt, this would be done as:
  16.  
  17.               setenv ALT_DISPLAY B:0.0
  18.  
  19.       Alternatively, if you have a single machine with 2 screens, 
  20.       setting the ALT_DISPLAY variable to :0.1 will cause dualhead to 
  21.       take advantage of the two screens.  This could be done as:
  22.  
  23.               setenv ALT_DISPLAY :0.1
  24.  
  25.       Now run dualhead.  You should see a window displayed on machine 
  26.       "A" with 3 buttons:  "newGL", "newX", and "switch screen".  
  27.       Pressing the "newGL" button will cause a window with a GL drawing 
  28.       area to come up on machine B (or the second screen if running on 
  29.       a dual-head system).  Pushing the "newX" button will cause a 
  30.       similar result, only an X window will be created.  Note that 
  31.       "newGL" windows on the ALT_DISPLAY are filled red and "newX" 
  32.       windows are filled black.  The name of the display is also at the 
  33.       top of the screen in the window name bar.  Hitting the "switch 
  34.       screen" button will toggle the current screen, so that any 
  35.       "newGL" or "newX" windows created will show up on the other 
  36.       screen.  "newGL" windows on the main display will be filled blue, 
  37.       "newX" windows filled white.
  38.  
  39.       
  40.       All of the windows created are applicationShellWidgets, so if you
  41.       kill one, you kill them all.  You could use other types of shells
  42.       so that you could kill them individually.  The excersize is left
  43.       to the reader.
  44.  
  45.                            created by the late Derek "pugster" Spears, 92-93
  46.